using System;
using Antlr.StringTemplate;

namespace Examples.StringTemplate
{
    public interface IRenderer : IAttributeRenderer
    {
        Type ObjectType();
    }

    public class AwesomeDateRenderer : IRenderer
    {
        public string ToString(object o)
        {
            var item = (DateTime) o;
            return "Awesome " + item.Year;
        }

        public string ToString(object o, string formatName)
        {
            return ToString(o);
        }

        public Type ObjectType()
        {
            return typeof(DateTime);
        }
    }
}